/**
 * Created by Administrator on 2017/7/14.
 */
import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
    state: {
        powerData: [],//权限
        identity:'',   // 当前登录人的身份
        languageType: "zh",//语言包
        currentActive:'ManagementUnit' // 当前地址栏 当前活动菜单
        // urlName:''   // 当前地址栏 当前活动菜单
    },
    mutations: {
        grant(state,powerData) {   //权限
            state.powerData=powerData;
            // console.log("全局下的权限赋值",state.powerData);
        },
        identity(state,identity){ // 当前登录人的身份
            state.identity=identity;
        },
        currentActive(state,currentActive){    //当前地址栏   当前活动菜单
            state.currentActive=currentActive;
        },
        // actived(state,urlName){    //当前地址栏   当前活动菜单
        //     state.urlName=urlName;
        // },
        languageType(state,languageType){    //语言类型
            state.languageType=languageType;
        },
    }
})
export default  store